<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style>
		body {
			margin-top: 30px;
			width: 800px;
			margin: auto;
			background: no-repeat url(https://img2.baidu.com/it/u=3650317390,2771988967&fm=253&fmt=auto&app=138&f=JPEG?w=1195&h=500);
		}
	</style>
	<body>
		<div>技能等级:
			<input type="number" class="grade">
		</div>
		<div>
			固伤：<span class="fixed"></span>
			蓝耗：<span class="blue"></span>
		</div>
	</body>
	<script>
		let Grade = document.querySelector('.grade');
		let Fixed = document.querySelector('.fixed');
		let Blue = document.querySelector('.blue');

		function Species() {
			let x = Number(this.value);
			let y = x * 5;
			let a = 25 * x * x + 105 * x + 68 - ((5 * x + 5) % 6) * (5 * x + 4);
			let b = y * y + 21 * y + 68 - ((y + 5) % 6) * (y + 4);
			let c = 30;
			let m;
			console.log(x);
			if (x <= 10) {
				m = x + 2;
			} else {
				m = 12;
			}
			// if (x <= 11) {
			// 	c = x + 19;
			// } else {
			// 	c = 30;
			// }
			if (x <= 20) {
				c = x + 19;
			} else {
				c = 39;
			}
			let num = b * m * (200 + y) / 160;
			let nums = a / c * 125 / 9;
			Fixed.innerText = Math.floor(num);
			Blue.innerText = Math.floor(nums);
		}
		Grade.addEventListener("blur", Species);
	</script>
</html>
